package com.bwie.controller;

import com.bwie.service.TbDictService;
import com.bwie.utils.R;
import com.bwie.vo.PageInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.time.Period;

/**
 * @Author: badaotianqiong
 * @Date: 2025/7/22 20:08
 * @Description:
 **/
@RestController
@RequestMapping("/product/index")
public class DictController {

    @Autowired
    private TbDictService tbDictService;

    @PostMapping("/getDictList")
    public R getDictList(@RequestBody PageInfoVo pageInfoVo){
        return tbDictService.getDictList(pageInfoVo);
    }

    @PostMapping("getDictListByTypeId/{typeId}")
    public R getDictListByTypeId(@PathVariable("typeId") Integer typeId){
        return tbDictService.getDictListBytypeId(typeId);
    }
}
